package com.util.common.sql;

import org.apache.commons.lang.StringUtils;

import com.util.common.sql.SearchBlock;

public class SearchBlockImp implements SearchBlock {

	@Override
	public String[] split(String value) {
		return null;
	}

	@Override
	public String mergeString(String src) {
		if( StringUtils.isBlank(src) ){ return ""; }
		src = src.trim();
		char[] newvalue = new char[src.length()];
		src.getChars(0, src.length(), newvalue, 0);
		StringBuffer bufDst = new StringBuffer();
		bufDst.append('%');
		for(int i = 0;i < newvalue.length;i++){
			bufDst.append(newvalue[i]);
			bufDst.append('%');
		}
		return bufDst.toString();
	}
	
	public static void main(String[] args){
		SearchBlock bl = new SearchBlockImp();
		String str = bl.mergeString("刘化罗");
		System.out.println(str);
	}
	
}
